{__NOLAYOUT__}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
	{include file="public/script" /}
</head>
<body>
	<div class="sectionH sectionH2  mui-clearfix">
		<header class="mui-bar mui-bar-nav" style="">
			<!--<a class="mui-icon mui-icon-left-nav  mui-pull-left" href="javascript:history.back(-1)" style="color: #727272;"></a>-->
			<h1 class="mui-title">活动</h1>
			<!--<a class="mui-icon mui-pull-right right1" href="assets-1.html"><img src="images/icon_setting.png"/></a>-->
		</header>
	</div>
	<div class="kong1"></div>
	<div class="wealth_section1">
		<div class="tiy mui-clearfix" style="position: fixed;z-index: 999;">
			<ul>
				<li><div><a href="{:url('Resource/resourceList')}"><img src="__STATIC__/www/images/Lian_activity_ok.png" alt="" /></a></div></li>
				<li><div><a href="{:url('Resource/unionList')}"><img src="__STATIC__/www/images/Lian_com_default.png" alt="" /></a></div></li>
			</ul>
		</div>
		<div class="kong1"></div>
		<div class="kong1"></div>
		<div id="items" style="position: absolute;z-index: 2;width: 100%;height: 72%;">
			<div class="index_section4_2 select" style="position: absolute;width: 100%;z-index: 1;">
				<div class="container" style="position: relative;">
					{volist name="list" id="l"}
					<div class="index_section4_2_1">
						<a href="{:url('Resource/resourceInfo',array('id'=>$l.id))}">
							<div class="big">
								<p class="p1 zzzzz">{$l.title}</p>
								<p class="p2">活动时间：{$l.begintime}--{$l.endtime}</p>
								<img src="{$l.thumb}"/>
							</div>
						</a>
					</div>
					{/volist}
				</div>
			</div>
		</div>


		
	</div>

{include file="public/footer" /}
</body>
<script>
    mui.init({
        pullRefresh: {
            container: '#items',
            down: {

            },
            up: {
                auto:false,
                contentrefresh: '正在加载...',
                callback: pullupRefresh
            }
        }
    });
    var count = 1;
    function pullupRefresh() {
        setTimeout(function() {
            // mui('#items').pullRefresh().endPullupToRefresh((++count > 2)); //参数为true代表没有更多数据了。
            var table = document.body.querySelector('.container');
            var url="{:url('Resource/resourceList')}";
            count++;
            $.post(url,{page:count,page_size:5},function(data){
                var data=JSON.parse(data);
                if(data==0)
                {
                    mui('#items').pullRefresh().endPullupToRefresh((data==0));
                }else{
                    for (var i = 0; i < data.length; i++) {
                        var li = document.createElement('div');
                        li.className = 'index_section4_2_1';
                        var url1="/Resource/resourceInfo/id/"+data[i]['id'];

                        li.innerHTML = '<a href="'+url1+'"><div class="big">\n' +
                            '<p class="p1 zzzzz">'+data[i]['title']+'</p>\n' +
                            '<p class="p2">活动时间：'+data[i]["begintime"]+'--'+data[i]["endtime"]+'</p>\n' +
                            '<img src="'+data[i]["thumb"]+'"/>\n' +
                            '</div></a>';
                        table.appendChild(li);

                    }

                }
                mui('#items').pullRefresh().endPullupToRefresh((data==0));
            })

        }, 1000);
    }
</script>


</html>